As is known, a microprogrammable device is an electronic device comprising: a processor; a code memory storing a software and/or firmware code which, when the microprogrammable device is in use, is executed by the processor; and a data memory, in which values of variables used in executing the code are stored.
As is also known, the content of the code memory, i.e. the code, of a microprogrammable device may be altered, i.e. corrupted, by electromagnetic interference (EMI) to which the microprogrammable device is exposed.
To determine corruption of the code, a code signature is therefore computed cyclically and compared with a reference signature.
More specifically, signature computation comprises a logic-mathematical calculation involving all the elements stored in the code memory, and which is performed by the processor on the basis of a signature computation function normally forming part of the code stored in the code memory.
The reference signature, on the other hand, is computed when compiling the microprogrammable device code, and is stored in the microprogrammable device code memory at the same time as the code.
The signature computation function is executed periodically by the processor and normally has the lowest priority, i.e. is executed by the processor when it is not executing other code functions.
If the processor-computed signature does not match the reference signature stored in the code memory, the microprogrammable device is disabled to prevent damage.
The Applicant has observed, however, that, in the event the code is corrupted, developments in execution of the code are impossible to be predicted, which means execution of the signature computation function is no longer assured once the code is corrupted.
More specifically, in the event the code is corrupted, the signature may be computed wrongly or, worse still, may cease to be computed by the processor, so that corruption of the code may never be detected.